home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / dev / lang / Python16_Src.lha / Python16_Source / Python / dynload_dl.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-08-03  |  532 b   |  26 lines

  1. /* Support for dynamic loading of extension modules */
  2.  
  3. #include "dl.h"
  4.  
  5. #include "Python.h"
  6. #include "importdl.h"
  7.  
  8.  
  9. extern char *Py_GetProgramName();
  10.  
  11. const struct filedescr _PyImport_DynLoadFiletab[] = {
  12.     {".o", "rb", C_EXTENSION},
  13.     {"module.o", "rb", C_EXTENSION},
  14.     {0, 0}
  15. };
  16.  
  17.  
  18. dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
  19.                     const char *pathname, FILE *fp)
  20. {
  21.     char funcname[258];
  22.  
  23.     sprintf(funcname, "init%.200s", shortname);
  24.     return dl_loadmod(Py_GetProgramName(), pathname, funcname);
  25. }
  26.